﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace MyCourseManager.Common
{
    public class MD5Provider
    {

        public static string CreateMD5(string str)
        { 
            MD5 md5 = MD5.Create();
            byte[] bt = md5.ComputeHash(Encoding.UTF8.GetBytes(str));
            return string.Concat(bt.Select(x => x.ToString("X2")));
        }
    }
}
